package cn.haoma.base.http;

import com.alibaba.fastjson.JSONObject;

import java.util.List;

/**
 * Created by ilioili on 2015/6/18.
 */
public class PageDataWraper {
    private int page;
    private int totalCount;
    private int totalPages;
    private int limit;
    private String items;

    public <T> List<T> getItemList(Class<T> clazz) {
        return JSONObject.parseArray(items, clazz);
    }

    public String getItems() {
        return items;
    }

    public void setItems(String items) {
        this.items = items;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }
}
